package com.augurit.gzcgwsp.ywcmn.dao;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.augurit.common.base.dao.BaseDao;
import com.augurit.gzcgwsp.ywcmn.entity.YwComSjcl;

@Repository
public class YwComSjclDao extends BaseDao<YwComSjcl, Long> {

    public YwComSjcl getEntityByAjId(Long ajId) {
       Session session=getSession();
       Criteria criteria=session.createCriteria(YwComSjcl.class);
       criteria.add(Restrictions.eq("", ""));
        return null;
    }

    public void update(YwComSjcl sjclEntity) {
        Session session=getSession();
        session.update(sjclEntity);
        
    }

    public YwComSjcl getEntity(Long id) {
        YwComSjcl entity=null;
        Session session=getSession();
        Criteria criteria=session.createCriteria(YwComSjcl.class);
        criteria.add(Restrictions.eq("id", id));
        List<YwComSjcl> list=criteria.list();
        if(list!=null && list.size()>0){
            entity=list.get(0);
        }
        return entity;
    }
}